package org.iabako.client.ui.page.business.notification;

import org.iabako.client.config.page.PageConfigEnum;
import org.iabako.client.ui.form.business.notification.NotificationConfigForm;
import org.iabako.client.user.AuthenticateUserProvider;
import org.iabako.shared.exception.IabakoActionForbiddenException;

/**
 * Created by jose on 15/01/15.
 */
public class NotificationConfig extends NotificationConfigForm {

    public NotificationConfig() throws IabakoActionForbiddenException {
        super(PageConfigEnum.NotificationConfiguration);

        if (AuthenticateUserProvider.getUser().getEnterprise().isDemo()) {
            throw new IabakoActionForbiddenException("action_disable_for_demo_title", "action_disable_for_demo_text", true);
        }
    }
}
